import { Link } from "react-router-dom";
import "./index.scss";
import LazyImage from "@/hooks/lazyImage";
function HomeGoods({ goods }: { goods: any }) {
  return (
    <>
      <div className="goods-item">
        <Link to={`/product/${goods.id}`} className="image">
          <LazyImage src={goods.picture} alt="" />
        </Link>
        <p className="name ellipsis-2">{goods.name}</p>
        <p className="desc">{goods.tag}</p>
        <p className="price">&yen;{goods.price}</p>
        <div className="extra">
          <Link to="/">
            <span>找相似</span>
            <span>发现现多宝贝 &gt;</span>
          </Link>
        </div>
      </div>
    </>
  );
}

export default HomeGoods;
